-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[18.0][MIG] l10n_ch_adr_report: Migration to 18.0 #740
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] l10n_ch_adr_report: Migration to 18.0 #740
Conversation
4add359
to
b2f4154
Compare
fa7467b
to
d90f377
Compare
d90f377
to
5c9c508
Compare
qty = 0 | ||
for rec in move_lines: | ||
if rec.state == "done": | ||
qty += rec.quantity_done | ||
else: | ||
qty += rec.product_uom_qty | ||
qty = sum(line.quantity for line in move_lines) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this is correct, because with the change in Odoo core we still have the product_uom_qty
field.
I think this
qty = 0
for rec in move_lines:
if rec.picked:
qty += rec.quantity
else:
qty += rec.product_uom_qty
would be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @TDu, i see that the use of picked
field is not quite like its definition in this case. but maybe i was a bit confused about product_uom_qty
so i will restore the original code and just edit quantity
to replace the outdated quantity_done
Also adding some small unit tests would be a good improvement for this migration |
284f106
to
c561375
Compare
By default all moves related to dangerous product are used to generate the report. This PR adds a hook that allow to customize the filtering.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-switzerland-14.0/l10n-switzerland-14.0-l10n_ch_adr_report Translate-URL: https://translation.odoo-community.org/projects/l10n-switzerland-14-0/l10n-switzerland-14-0-l10n_ch_adr_report/
c561375
to
dc044ec
Compare
Depends on:
Note
Result
Swiss Dangerous Goods Report.pdf